<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="./../WEB-INF/template/general.xhtml">
    <ui:define name="content">
        <h:form id="actiform" rendered="false" >
            <table>
                <thead>Detalle Actividades</thead>
                <tbody>
                    <tr>
                        <td>N. Prinx</td>
                        <td><p:inputText value="#{customerOperationsBean.prinxNumber}" ></p:inputText></td>
                        <td>
                            <h:commandButton value="Enviar" type="submit" actionListener="#{customerOperationsBean.inquireActivityDetail}" ></h:commandButton>
                            <h:commandButton value="Limpiar" type="submit" action="#{customerOperationsBean.cleanPrinxNumber}" ></h:commandButton>
                        </td>
                    </tr>
                </tbody>
            </table>

            <p:dataTable id="actsolidataTable" value="#{customerOperationsBean.actividadDetalleList}" 
                         var="actDetList" paginator="true" 
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                         rowsPerPageTemplate="5,10,15,20,50,100"
                         liveScroll="true" scrollable="true" rows="20" liveResize="true" resizableColumns="true" draggableColumns="true" >
                <p:column id="maprsecuColumn" 
                          headerText="Seq" width="25">
                    <!--
                        filterBy="maprsecu"   
                          filterMatchMode="contains"
                    -->
                    <h:outputText value="#{actDetList.maprsecu}" ></h:outputText>
                </p:column>
                <p:column id="maprfechColumn" filterBy="maprfech"
                          filterMatchMode="contains"
                          headerText="Fecha" width="50">
                    <h:outputText value="#{actDetList.maprfech}" ></h:outputText>
                </p:column>
                <p:column id="maprdetaColumn" filterBy="maprdeta"   
                          filterMatchMode="contains"
                          headerText="Detalle" width="350" >
                    <h:outputText value="#{actDetList.maprdeta}" ></h:outputText>
                </p:column>
            </p:dataTable>
        </h:form>
        
        <br></br>

        <h:form id="soliform">
            <p:dataTable id="solidataTable" paginator="true" 
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                         rowsPerPageTemplate="5,10,15,20,50,100" value="#{customerOperationsBean.solicitudList}" 
                         var="solicitudReg" liveScroll="true" scrollable="true" rows="20" liveResize="true" draggableColumns="true" >
                <p:column id="requcodiColumn" filterBy="requcodi"   
                          filterMatchMode="contains"
                          headerText="Prinx">
                    <h:outputText value="#{solicitudReg.requcodi}" />
                    
                </p:column>
                <p:column id="requreprrequpersnombColumn" filterBy="requreprrequpersnomb"    width="100"
                          filterMatchMode="contains"
                          headerText="Responsable">
                    <h:outputText value="#{solicitudReg.requreprrequpersnomb}" />
                </p:column>
                <p:column headerText="Cliente"
                          id="tercdescColumn" filterBy="tercdesc"   
                          filterMatchMode="contains">
                    <h:outputText value="#{solicitudReg.tercdesc}" />
                </p:column>
                <p:column headerText="Proyecto" rendered="false" >
                    <h:outputText value="#{solicitudReg.proydesc}" />
                </p:column>
                <p:column id="requfesiColumn" filterBy="requfesi" 
                          filterMatchMode="contains" headerText="Ingreso">
                    <h:outputText value="#{solicitudReg.requfesi}" />
                </p:column>
                <p:column id="requfecoColumn" filterBy="requfeco" 
                          filterMatchMode="contains" headerText="Compromiso">
                    <h:outputText value="#{solicitudReg.requfeco}" />
                </p:column>
                <p:column headerText="Estado" id="estadescColumn" filterBy="estadesc"
                          filterMatchMode="contains">
                    <h:outputText value="#{solicitudReg.estadesc}" />
                </p:column>
                <p:column headerText="Producto" id="proddescColumn" filterBy="proddesc"
                          filterMatchMode="contains">
                    <h:outputText value="#{solicitudReg.proddesc}" />
                </p:column>
                <p:column headerText="Clase RQ" rendered="false" >
                    <h:outputText value="#{solicitudReg.clredesc}" />
                </p:column>
                <p:column headerText="Tipo RQ" rendered="false" >
                    <h:outputText value="#{solicitudReg.tiredesc}" />
                </p:column>
                <p:column headerText="Descripcion" width="300" id="requdetaColumn" filterBy="requdeta"
                          filterMatchMode="contains">
                    <h:outputText value="#{solicitudReg.requdeta}" />
                </p:column>
                <p:column id="requsoliColumn" filterBy="requsoli" 
                          filterMatchMode="contains" headerText="Solicitante" >
                    <h:outputText value="#{solicitudReg.requsoli}" />
                </p:column>
            </p:dataTable>
            <!--</h:form>
            <h:form id="dataexporterform">-->
            <h:panelGrid columns="2">  
                <p:panel header="Exportar Todo">  
                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/excel.png" /> 
                        <p:dataExporter type="xls" target="solidataTable" fileName="compAgend" />  
                    </h:commandLink>  

                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/pdf.png" />
                        <p:dataExporter type="pdf" target="solidataTable" fileName="compAgend"/>  
                    </h:commandLink>  

                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/csv.png" />
                        <p:dataExporter type="csv" target="solidataTable" fileName="compAgend" />  
                    </h:commandLink>  

                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/xml.png" />
                        <p:dataExporter type="xml" target="solidataTable" fileName="compAgend" />  
                    </h:commandLink>  
                </p:panel>  

                <p:panel header="Exportar Pagina">  
                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/excel.png" />
                        <p:dataExporter type="xls" target="solidataTable" fileName="compAgend" pageOnly="true"/>  
                    </h:commandLink>  

                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/pdf.png" />
                        <p:dataExporter type="pdf" target="solidataTable" fileName="compAgend" pageOnly="true" />  
                    </h:commandLink>  

                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/csv.png" />
                        <p:dataExporter type="csv" target="solidataTable" fileName="compAgend" pageOnly="true"/>  
                    </h:commandLink>  

                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/xml.png" />
                        <p:dataExporter type="xml" target="solidataTable" fileName="compAgend" pageOnly="true"/>  
                    </h:commandLink>  
                </p:panel>  
            </h:panelGrid> 
        </h:form>                
    </ui:define>
</ui:composition>
